import pymysql
conn=pymysql.connect(host='localhost',port=3306,user='root',password='root',charset='utf8',database='test01')
cursor=conn.cursor()
cursor.execute('select * from student')

# res=cursor.fetchone()
# print(res)
#
# res1=cursor.fetchmany(2)
# print(res1)

cursor.rownumber=0
res2=cursor.fetchall()
print(res2)

cursor.close()
conn.close()
